package com.example.springboot_code_read.annotationBeanDefinitionReader;

import com.example.springboot_code_read.bean.MyBean;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.annotation.AnnotatedBeanDefinitionReader;

public class AnnotationBeanDefinitionTest {

    public static void main(String[] args) {

        DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();

        AnnotatedBeanDefinitionReader beanDefinitionReader = new AnnotatedBeanDefinitionReader(beanFactory);

        beanDefinitionReader.registerBean(MyBean.class);

        System.out.println("myBean=" + beanFactory.getBean(MyBean.class));

    }


}
